setupTest.js ➔ ???   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 6
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 1
rs 10
c 6
b 0
f 0
1
window.cancelAnimationFrame = window.cancelAnimationFrame || function(){}
2
window.requestAnimationFrame = window.requestAnimationFrame || function(){}
3
class LocalStorageMock {
4
  constructor() {
5
    this.store = {};
6
  }
7
8
  clear() {
9
    this.store = {};
10
  }
11
12
  getItem(key) {
13
    return this.store[key];
14
  }
15
16
  setItem(key, value) {
17
    this.store[key] = value.toString();
18
  }
19
};
20
21
global.localStorage = new LocalStorageMock;
22